
import {
  requestAjax
} from './config.js'
// 我的优惠券
export const my_coupon = (data) => {
  return requestAjax('/api/v1/coupon/user/myList', data, 'GET')
}
// 可领取的优惠券
export const availableList = (data) => {
  return requestAjax('/api/v1/coupon/user/availableList', data, 'GET')
}
// 领取优惠券
export const get_coupont_id = (data) => {
  return requestAjax('/api/v1/coupon/user/receive', data, 'POST')
}
// 批量领取优惠券
export const get_coupont_all = (data) => {
  return requestAjax('/api/v1/coupon/user/batchReceive', data, 'POST')
}
// 领取优惠券 新的
export const receiveByPassword = (data) => {
  return requestAjax('/api/v1/coupon/user/receiveByPassword', data, 'POST')
}
// 查看优惠券详情
export const get_coupont_details = (data) => {
  return requestAjax('/api/v1/coupon/web/get/'+data.id, {}, 'GET')
}

export const get_by_password = (data) => {
  return requestAjax('/api/v1/coupon/user/getByPassword/'+data.id, {}, 'GET')
}
// -查询未过期的收费优惠券
export const get_coupon_charge = (data) => {
  return requestAjax('/api/v1/coupon/user/pageList', data, 'GET')
}


